SCRIPTNN n/a   IE 4   DOM 1

The SCRIPT object reflects the SCRIPT element. Note that the Win32 version of Internet Explorer chokes on accessing or setting the innerHTML or innerText properties.

 
HTML Equivalent
<SCRIPT>
 
Object Model Reference
IE [window.]document.all.elementID
deferNN n/a   IE 4   DOM n/a
 Read/Write
 

Whether the browser should proceed with rendering regular HTML content without looking for the script to generate content as the page loads. This value needs to be set in the SCRIPT element's tag at run-time. When this property is set to true by the addition of the DEFER attribute to the tag, the browser does not have to hold up rendering further HTML content to parse the content of the SCRIPT element in search of document.write( ) statements. Changing this property's value after the document loads does not affect the performance of the script or browser.

 
Example
document.all.myScript.defer = "true"
 
Value
Boolean value: true | false.
 
Default false
eventNN n/a   IE 4   DOM n/a
 Read-only
 

Internet Explorer 4's event model allows binding of object events to SCRIPT elements with the help of the EVENT and FOR attributes (see ). The event property returns the setting for the EVENT attribute.

 
Example
if (document.all.scripts[2].event == "onresize") {
    ...
}
 
Value
Case-sensitive event name.
 
Default None.
htmlForNN n/a   IE 4   DOM n/a
 Read-only
 

Returns the value (element ID) assigned to the FOR attribute of a SCRIPT element. This attribute defines the document element to which the script is bound when a specific event (set by the EVENT attribute) fires for the element.

 
Example
if (document.all.scripts[3].htmlFor == "helpButton") {
    ...
}
 
Value
String.
 
Default None.
readyStateNN n/a   IE 4   DOM n/a
 Read-only
 

Returns the current download status of the script being loaded from an external library (.js) file. This property provides a more granular way of testing whether a particular downloadable element is ready to be run or scripted instead of the onLoad event handler for the entire document. As the value of this property changes during loading, the system fires an onReadyStateChange event.

 
Example
if (document.all.myExternalScript.readyState == "uninitialized") {
    statements for alternate handling
}
 
Value
One of the following values (as strings): complete | interactive | loading | uninitialized. Some elements may allow the user to interact with partial content, in which case the property may return interactive until all loading has completed.
 
Default None.
srcNN n/a   IE 4   DOM 1
 Read-only
 

URL of the .js script file imported into the current SCRIPT element.

 
Example
if (document.all.scripts2.src == "scripts/textlib.js") {
    ...
}
 
Value
Complete or relative URL as a string.
 
Default None.
textNN n/a   IE 4   DOM 1
 Read-only
 

The text content of the element.

 
Example
var scriptText = document.all.script3.text
 
Value
String.
 
Default None.
typeNN n/a   IE 4   DOM 1
 Read-only
 

An advisory about the content type of the script statements. The content type should tell the browser which scripting engine to use to interpret the script statements, such as text/javascript. The TYPE attribute may eventually replace the LANGUAGE attribute as the one defining the scripting language in which the element's statements are written.

 
Example
var scriptMIMEtype = document.all.script3.type
 
Value
String.
 
Default None.